<?php
/* @var $this MemAddresController */
/* @var $model MemAddres */
/* @var $form CActiveForm */
?>
<div class="address_form add_form">
        	<div class="ico ico_close close"></div>
        	<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'address-form',
			'action'=>!empty($model->zma_id)?'/members/imdex/addressupdate':'/members/imdex/addresscreate',
			'enableAjaxValidation'=>false,
		)); ?>
			<?php echo $form->HiddenField($model,'zm_id')?>
			<?php echo $form->HiddenField($model,'zma_id')?>
        	<ul>
            	<li>
            		<span class="tit"><em class="xing">*</em>收货人姓名：</span>
            		<?php echo $form->textField($model,'zma_name',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_nameTip"></span>
            	</li>
                <li><span class="tit"><em class="xing">*</em>省&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;份：</span>
                	<?php Area::getAreainfo('MemAddres',$model->zar_id,'clasname'); ?>
                    <span id="MemAddres_zar_idTip"></span>
                </li>
                <li>
                	<span class="tit"><em class="xing">*</em>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：</span>                	
					<?php echo $form->textField($model,'zma_address',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_addressTip"></span>
                </li>
                <li>
                	<span class="tit"><em class="xing">*</em>手机：</span>
                	<?php echo $form->textField($model,'zma_tel',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_telTip"></span>
                </li>
                <li>
                	<span class="tit">固定电话：</span>
                	<?php echo $form->textField($model,'zma_mob',array('class'=>'t_ipt ipt_bg')); ?>
					<?php echo $form->error($model,'zma_mob'); ?>
                </li>
                <li>
                	<span class="tit">电子邮件：</span>
                	<?php echo $form->textField($model,'zma_email',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_emailTip"></span>
                </li>
                <li>
                	<span class="tit">邮政编码：</span>
                	<?php echo $form->textField($model,'zma_zip',array('class'=>'t_ipt ipt_bg')); ?>
					<span id="MemAddres_zma_zipTip"></span>
                </li>               
                <li>
                	<span class="tit"></span>
                	<?php echo CHtml::submitButton(Yii::t('cmp','Save'),array('class'=>'mem_btn mem_btn06')); ?>
					<?php echo CHtml::resetButton(Yii::t('cmp','Reset'),array('class'=>'mem_btn mem_btn07')); ?>
                </li>
            </ul>
            <?php $this->endWidget(); ?>
</div>
		
 <!-- 表单验证 -->
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl;?>/js/formvalidata/formValidator-4.1.1.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl;?>/js/formvalidata/formValidatorRegex.js"></script>
 <script>
	jQuery(document).ready(function($) {
		$.formValidator.initConfig({theme:"Default",formID:"address-form",
			onError:function(msg, obj){
						alert(msg);
						return false;
					},
			onsuccess:function(){ return true; }
		});
	})
</script>
<script type="text/javascript" src="<?php echo Yii::app()->baseUrl;?>/js/formvalidata/cmpValidate.js"></script> 